q = []  # 新建一个空队列

inputs = ["a", "b", "c", "d"]  # 待被压入的数据

for i in inputs:  
  q.append(i)  # 压入数据

while q:
  output = q.pop(0)  # 弹出数据
  print(output)